package com.zxc.dao;

import java.sql.Connection;
import java.sql.SQLException;

import com.zxc.domain.TableInfo;
import com.zxc.util.DBUtil;

public class TransDataDAO extends BaseDAO{
	public boolean verity(String sql,TableInfo fromTable, DBUtil fromDBUtil, TableInfo toTable ,DBUtil toDBUtil) throws SQLException{
		Connection fromDB = fromDBUtil.getConnection();
		Connection toDB = toDBUtil.getConnection();
		TableInfoDAO infoDao = new TableInfoDAO();
		infoDao.queryTableInfo(sql,fromTable,fromDB);
		infoDao.queryTableInfo("select * from "+toTable.getTableSpecName(),toTable,toDB);
		return toTable.getTableHeaders().containsAll(fromTable.getTableHeaders());
	}
}
